<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@page import="comm.util.RequestManager"%>
<%@page import="comm.util.SoptHashMap"%>
<%@page import="java.util.ArrayList"%>

<%@page import="styledaco.board.CategoryProc"%>
<%@page import="statics.SoptVars"%>    
<%
	SoptHashMap hm = RequestManager.getRequest(request);
	System.out.println(hm.toString());
	ArrayList menuList = null;
	String curMenuType = CommUtil.NVL(hm.get("M"),"");
	String curCategory = "";
	if(curMenuType.length()>0){
		CategoryProc category = new CategoryProc();
		
		if(curMenuType.equals("Style")){
			menuList = category.getCategoryList(SoptVars.MENU_STYLE);
		}else if(curMenuType.equals("Community")){
			menuList = category.getCategoryList(SoptVars.MENU_COMMUNITY);
		}else if(curMenuType.equals("Shop")){
			menuList = category.getCategoryList(SoptVars.MENU_SHOP);
		}else if(curMenuType.equals("About")){
			menuList = category.getCategoryList(SoptVars.MENU_ABOUT);
		}else if(curMenuType.equals("Notice")){
			menuList = category.getCategoryList(SoptVars.MENU_NOTICE);
		}
	}
%>  

<%@page import="comm.util.CommUtil"%>
<div>
	<ul>
		<%if(menuList!=null && menuList.size()>0){
			curCategory = CommUtil.NVL(hm.get("S"),((SoptHashMap)menuList.get(0)).get("CATEGORY_SEQ").toString());
			for(int i=0;i<menuList.size();i++){
				SoptHashMap curMenuHm = (SoptHashMap)menuList.get(i);%>
				<li <%if(curCategory.equals(curMenuHm.get("CATEGORY_SEQ").toString())){%>class="leftMenuSelectedLi"<%}%>>
					<a href="javascript:void(0);" onclick="javascript:getBoardListByCategory(this,'<%=curMenuHm.get("CATEGORY_SEQ")%>','<%=curMenuType%>')">
						<%=curMenuHm.get("CATEGORY_NAME")%>
					</a>
				</li>
			<%} %>
		<%} %>
	</ul>
</div>